<!--#include file="CheckSession.asp"-->
<!--#include file="../inc/PublicFun.Asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <title>���ݹ���</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" charset="utf-8" src="../webedit/kindeditor.js"></script>
    <script type="text/javascript">
        KE.show({
            id: 'scontent',
            imageUploadJson: '../../upload_json.asp',
            fileManagerJson: '../../file_manager_json.asp',
            allowFileManager: true,
            afterCreate: function (id) {
                KE.event.ctrl(document, 13, function () {
                    KE.util.setData(id);
                    document.forms['form1'].submit();
                });
                KE.event.ctrl(KE.g[id].iframeDoc, 13, function () {
                    KE.util.setData(id);
                    document.forms['form1'].submit();
                });
            }
        });
    </script>
</head>
<body>
<%
stitle = Request("stitle")
	sid = Request("sid")
	action = Request("action")
	sContent = trim(request . Form("sContent"))
	strAlert = "�޸ĳɹ�"
	If action = "s" then
		Set Rs = Server . CreateObject("Adodb.RecordSet")
		Sql = "Select * from xy_content where id=" & sid & ""
		Rs . open Sql,Conn,1,3
			If Rs . Eof Then
				Rs . AddNew
				strAlert = "��ӳɹ�"
			End If
Rs("title") = stitle
Rs("content") = sContent
				Rs("Times") = Now()
		Rs . Update
		Rs . Close()
		Set Rs = Nothing
		Response . Write("<script language='javascript'>alert('" & strAlert & "');window.location.href='Admin_DetailList.Asp?sid=" & sid & "&stitle=" & stitle & "'</script>")
	End If
	
	scontent = getcontent(sid)
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td height="50" align="center" class="title"><%= stitle %>����</td>
    </tr>
</table>
<table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" style="border-collapse:collapse">
    <form action="?action=s&stitle=<%= stitle %>&sid=<%= sid %>" method="post" name="form1">
        <tr>
            <td width="150" align="right" nowrap style="color:#FF0000">��ϸ����</td>
            <td><textarea name="scontent" id="scontent" style="height:380px;width:630px"><%= scontent %></textarea>
            </td>
        <tr>
            <td>&nbsp;</td>
            <td><input name="submit" type="submit" class="button" value="ȷ���ύ">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input name="reset" type="reset" class="button" value="ȡ����д"></td>
        </tr>
    </form>
</table>
</body>
</html>
